package controller;

import java.io.IOException;

import conmunicate.ClientDemo;
import conmunicate.ServerDemo;
import view.MyFrame;
import view.MyPanel;

public class Main{

	public static void main(String[] args) {
		try {
			MyFrame frame = new MyFrame();
			MyPanel panel = new MyPanel(frame);	
			frame.getContentPane().add(panel);
			
			ServerDemo server = new ServerDemo();
			ClientDemo client = new ClientDemo();		
			ConManager conm = new ConManager(server,client);
			
			DropChess dc = new DropChess(panel,conm);
			conm.addDc(dc);
			frame.addMouseListener(dc);
			panel.addclistener(conm);
			server.open(10086);
			
			frame.setVisible(true);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}





